import java.io.*;

public class AA extends A
{
	AA(String name) {
		this.name = name;
	}

	AA() {
		name = "Junix";
	}

	public void hello() {
		System.out.println("My name is "+name);
	}

	public void writeObject(ObjectOutputStream out)
		throws IOException
   	{
		out.writeUTF(name);
	}

	public void readObject(ObjectInputStream in)
		throws IOException, ClassNotFoundException
	{
		name  = in.readUTF();
	}

	private String name;


	public static void main(String[] args) {
		AA aa = new AA("JJKK");
		ObjectOutputStream out= null;

		try{
			out = new ObjectOutputStream (new  FileOutputStream("junix"));
			out.writeObject(aa);
		} catch (IOException ex) { }
		finally {} 

		try{
			out.close();
		} catch (IOException ex) { }
	}
}
